import request from '@/utils/request'

// 登录方法
export function login(user) {
    return request({
        url: '/user/login',
        headers: {
            isToken: false
        },
        method: 'post',
        data: user
    })
}

export function getInfo() {
    return request({
        url: '/user/getInfo',
        method: 'get',
    })
}

export function logout() {
    return request({
        url: '/user/logout',
        method: 'get',
    })
}

export function getRouters() {
    return request({
        url: '/user/getRouters',
        method: 'get',
    })
}

export function register(userDto) {
    return request({
        url: '/user/register',
        method: 'post',
        data: userDto
    })
}
